package com.ddd.mill.api.product.dto.request;

import com.alibaba.fastjson.JSONObject;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.Min;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotEmpty;
import java.util.List;
@ApiModel("")
@Data
public class AddProductDto {
    @ApiModelProperty("供应商名称")
    @NotBlank(message = "供应商名称不能为空")
    private String supplierName;
    @ApiModelProperty("商品分类id")
    @Min(value = 1, message = "商品分类参数值不合法")
    private Long productTypeId;
    @ApiModelProperty("工厂名称")
    @NotBlank(message = "工厂名称不能为空")
    private String factoryName;
    @ApiModelProperty("商品名称")
    @NotBlank(message = "商品名称不能为空")
    private String name;
    @ApiModelProperty("商品货号")
    private String goodsNo;
    @ApiModelProperty("单位。保存字典id")
    @Min(value = 1, message = "单位参数值不合法")
    private Long unit;
    @ApiModelProperty("销售模式。1：特价；2：拼团")
    @Min(value = 1, message = "销售模式参数值不合法")
    private Byte sellMode;
    @ApiModelProperty("简述")
    private String summary;
    @ApiModelProperty("拼团说明")
    private String groupSummary;
    @ApiModelProperty("缩略图")
    @NotBlank(message = "缩略图不能为空")
    private String litimgUrl;
    @ApiModelProperty("详情")
    private String detail;
    @ApiModelProperty("送货说明")
    private String deliverTips;
    @ApiModelProperty("轮播图")
    @NotEmpty(message = "轮播图不能为空")
    private List<String> imgList;
    @ApiModelProperty("sku")
    @NotEmpty(message = "商品价格不能为空")
    private List<JSONObject> skuList;
}
